mastodon_api\methods\admin/
mod.rs1pub mod accounts;
2pub mod domain_federation;
3pub mod ip_blocks;
4pub mod reports;
5
6use crate::MastodonClient;
7
8pub struct AdminHandler<'a> {
10 client: &'a MastodonClient,
11}
12
13impl<'a> AdminHandler<'a> {
14 pub fn new(client: &'a MastodonClient) -> Self {
16 Self { client }
17 }
18
19 pub fn accounts(&self) -> accounts::AdminAccountsHandler<'_> {
21 accounts::AdminAccountsHandler::new(self.client)
22 }
23
24 pub fn reports(&self) -> reports::AdminReportsHandler<'_> {
26 reports::AdminReportsHandler::new(self.client)
27 }
28
29 pub fn domain_federation(&self) -> domain_federation::AdminDomainFederationHandler<'_> {
31 domain_federation::AdminDomainFederationHandler::new(self.client)
32 }
33
34 pub fn ip_blocks(&self) -> ip_blocks::AdminIpBlocksHandler<'_> {
36 ip_blocks::AdminIpBlocksHandler::new(self.client)
37 }
38}